<@master template="master/master-loan" title="征信详情">
<@css href="/easyui/themes/default/easyui.css"/>
<@css href="/easyui/themes/icon.css"/>
<@js src="/easyui/jquery.easyui.min.js"/><@jsRender/>
<!-- 
<div class="mt10">
	<a href="#history" onclick="open_history();"><i class="cklcIco"></i>查看流程现流转节点</a>
	<a class="ml20"
		href="<@url value='/process/auditors?orgNo=${loanapply.ltd}' domain='o2o.admin.workflow'/>"
		target="_blank"><i class="clzjdIco"></i>查看所有流程节点及审核人</a>
</div>
-->
<!-- 贷前状态图 begin 
<#if loanapply.loanType=='BK'>
<div class="action-ajax-load"
	data-url="<@url value='/wftypeStatus/bk/beforeStatus?loanapplyNo=${loanapply.loanapplyNo}'/>"></div>
<#else>
<div class="action-ajax-load"
	data-url="<@url value='/wftypeStatus/oth/beforeStatus?loanapplyNo=${loanapply.loanapplyNo}'/>"></div>
</#if>
-->
<!-- 贷前状态图  end  -->
 <div class="detailsBox pb80">
 <#assign custType=loanapply.wfType />
 <!-- 作废信息 start -->
	<#if custType == "T">
		<div class="action-ajax-load"
			data-url="<@url value='/rbadloan/cancleDetail?loanapplyNo=${loanapply.loanapplyNo}' />"></div>
	</#if>
	<div class="detailsBox">
	 <div class="openBox">
	 <!-- 贷款要素 begin -->
	 <h3><i class="jtIco"></i>贷款要素
     </h3>
		<div class="action-ajax-load" data-url="/rback/l_i_common?loanapplyNo=${loanapply.loanapplyNo}"></div>	
	 <!-- 贷款要素  end -->
     </div>
    </div>
	
	<div class="detailsBox">
	 <div class="openBox">
       <h3><i class="jtIco1"></i>借款人基本信息
      <!-- <@permission permissionName="editUserBaseInfo">
       <#if custType=="NEW">
       <a class="action-ajax-btn fr edit btn_blue" href="/customerInfo/rest/query-update?loanUserId=${loanUser.id}" > 编辑 </a>
		</#if>
       </@permission> -->
       </h3>
	   <div class="detailTab">
             <div id="oa_tot_assets"  class="action-ajax-load" data-url="<@url value='/customerInfo/rest/query-view?loanUserId=${loanUser.id}' />" data-ajax-wait-img="<@cdn value='img.wait'/>" ></div>
	   </div> 
	 </div>
    </div>
    
    <#if loanSorpouseUser! >
    <div class="detailsBox">
	    <div class="openBox">
	       <h3><i class="jtIco1"></i>借款人配偶基本信息
	     <!--  <@permission permissionName="editUserSpouseInfo">
	       <#if custType=="NEW">
	       <a class="action-ajax-btn fr edit btn_blue" href="/customerInfo/rest/query-spouse-update?loanUserId=${loanSorpouseUser.id}" > 编辑 </a>
	       </#if>
	       </@permission> -->
	       </h3>
		   <div class="detailTab">
	             <div id="oa_tot_assets"  class="action-ajax-load" data-url="<@url value='/customerInfo/rest/query-spouse-view?loanUserId=${loanSorpouseUser.id}' />" data-ajax-wait-img="<@cdn value='img.wait'/>" ></div>
		   </div> 
	   </div> 
    </div>
    </#if>
	
	
	<!-- 资产信息start -->
		<div class="action-ajax-load" data-url="<@url value='/assetView/view?loanapplyNo=${loanapply.loanapplyNo}'/>"></div>
		<!-- 资产信息end -->
	 <div class="openBox">
        <h3>
            <i class="jtIco1"></i>门店信息
      <!--   <@permission permissionName="customerStoreManageAdd">
          <#if custType=="ZF">
          <a class="action-ajax-btn fr edit btn_blue"
               href="/customer/shop/rest/addPage?loanapplyNo=${loanapply.loanapplyNo}" target="_self">新增</a>
          </#if>
        </@permission> -->
        </h3>
        <div class="detailTab">
            <div class="action-ajax-load" data-url="<@url value='/customer/shop/list?loanapplyNo=${loanapply.loanapplyNo}'/>" data-ajax-wait-img="<@cdn value='img.wait'/>" >
        </div>
        </div>
    </div>
	
	<!-- 夫妻双方征信负债情况 begin -->
	<#if creditReport!=null>
		<div class="openBox">
			<h3>
				<i class="jtIco1"></i>夫妻双方征信负债情况 <@permission
				permissionName="updateCredit"> <#if loanEntity.wfType=='Z' ||
				loanEntity.wfType=='ZF'> <a class="action-ajax-btn fr edit btn_blue"
					data-url="<@url value='/workflowcheck/editZX?referId=${zXSSYHForm.referId}'/>">编辑</a>
				</#if> </@permission>
			</h3>
			<div class="action-ajax-load-show" id="file_uploader"
				data-url="<@url value='/detail/editCredit?referId=${loanapply.loanapplyNo}'/>"
				data-ajax-wait-img="<@cdn value='img.wait'/>" style="display: none"></div>
		</div>
		</#if>
	<!-- 夫妻双方征信负债情况  end -->
	<!-- 附件信息 begin -->
		<div class="openBox">
			<h3 class="mt20">
				<i class="jtIco"></i>附件信息
			</h3>
			<div class="dataBable" ><@pagination
				paginationInfo="datalistInfo"/></div>
		</div>
	<!-- 附件信息 end -->
	
	<#if loanapply.loanType!='BP'&&loanapply.loanType!='BP_JX'&&loanapply.loanType!='SG'&&loanapply.loanType!='YC'&&loanapply.loanType!='SC'>
	<!--财务SD数据 begin  -->
	<#if loanapply.wfType!="NEW">
	<div class="openBox">
		<h3 class="mt20">
			<i class="jtIco1"></i>财务审核SD信息
		</h3>
		<div class="action-ajax-load-show"
			data-url="<@url value='/detail/queryFinancialSd?loanapplyNo=${loanapply.loanapplyNo}'/>"
			data-ajax-wait-img="<@cdn value='img.wait'/>" style="display: none"></div>
	</div>
	</#if>
	<!--财务SD数据 end  -->
	<!-- SD系统交易记录汇总表（数据为近6个月内，自动从SD系统获取) begin -->
	<div class="openBox">
		<h3 class="mt20">
			<i class="jtIco1"></i>SD系统交易记录汇总表（数据为近6个月内，自动从SD系统获取实时数据)
		</h3>
		<div class="action-ajax-load-show"
			data-url="<@url value='/getSdData?customerSd=${loanapply.customerCode}&cno=${loanapply.customerNo}' />"
			data-ajax-wait-img="<@cdn value='img.wait'/>" style="display: none">
		</div>
	</div>
	<!-- SD系统交易记录汇总表（数据为近6个月内，自动从SD系统获取) end -->
	<!-- 财务审核记录 begin -->
	<#if loanapply.wfType!="NEW">
		<div class="openBox">
		<h3 class="mt20">
			<i class="jtIco1"></i>财务审核记录
		</h3>
	<div class="action-ajax-load-show"
		data-url="<@url value='/detail/queryFinancialAudit?referId=${loanapply.loanapplyNo}' />"
		data-ajax-wait-img="<@cdn value='img.wait'/>" style="display: none">
	</div>
	</div>
	</#if>
	<!-- 财务审核记录 end -->
	</#if>
	<!-- <#if loanapply.wfType=='NEW'|| loanapply.wfType=='Z' ||loanapply.wfType=='ZF' > -->
	<!-- 夫妻双方贷款记录  begin -->
	<div class="openBox">
		<h3 class="mt20">
			<i class="jtIco1"></i>夫妻双方的贷款记录
		</h3>
		<div class="action-ajax-load-show"
		data-url="<@url value='/customerInfo/rest/loan_detail?customer_id_number=${loanUser.documentNo}&mate_id_number=${loanSorpouseUser.documentNo}' />"
		data-ajax-wait-img="<@cdn value='img.wait'/>" style="display: none">
	</div>
	</div>
	<!-- </#if> -->
	<!-- 夫妻双方贷款记录  end -->
	
		<!-- 代偿数据 begin -->
	<div class="openBox">
		<h3 class="mt20">
		<i class="jtIco1"></i>夫妻双方代偿数据
		</h3>
	<div id="bad_loan_page" class="action-ajax-load" 
		data-url="<@url value='/rbadloan/badLoanPage?idCard=${loanUser.documentNo}&spouseIdCard=${materEntity.documentNo}'/>"
		data-ajax-wait-img="<@cdn value='img.wait'/>" style="display: none"></div>
	</div>
<!-- 代偿数据  end -->
<!-- 逾期数据 begin -->
	<div class="openBox">
		<h3 class="mt20">
		<i class="jtIco1"></i>夫妻双方逾期数据
		</h3>
	<div id="overdue_loan_page" class="action-ajax-load" 
		data-url="<@url value='/overdueReport/overdueLoanPage?idCard=${loanUser.documentNo}&spouseIdCard=${materEntity.documentNo}'/>"
		data-ajax-wait-img="<@cdn value='img.wait'/>" style="display: none"></div>
	</div>
<!-- 逾期数据  end -->
	
	<!-- 逾期信息 begin -->
 		<div class="openBox"> 
 			<h3 class="mt20"> 
				<i class="jtIco1"></i>代偿和逾期信息 
			</h3> 
			<div class="action-ajax-load-show" 
 				data-url="<@url value='/oaDetail/overdue?billCode=${loanapply.billCode}'/>" 
 				data-ajax-wait-img="<@cdn value='img.wait'/>" style="display: none"></div> 
		</div>
	<!-- 逾期信息 end -->
	<!-- 夫妻双方担保贷款信息  begin -->
	<div class="openBox">
		<h3 class="mt20">
			<i class="jtIco1"></i>夫妻双方担保贷款信息
		</h3>
		<div class="action-ajax-load-show"
		data-url='/loanrest/sponsorLoanapply?userId=${loanapply.loanId}'
		data-ajax-wait-img="<@cdn value='img.wait'/>" style="display: none">
	</div>
	</div>
	<!-- 夫妻双方担保贷款信息  end -->
	<!-- 增加担保人  begin -->
	<div class="openBox">
		<h3 class="mt20">
			<i class="jtIco1"></i>担保人
			<@permission permissionName="sponsorAddCode">
				<a class="action-ajax-btn fr" data-action-html="#o2o_SponsorList" href="/loanrest/sponsorDetail?loanapplyNo=${loanapply.loanapplyNo}">&nbsp&nbsp&nbsp&nbsp刷新&nbsp&nbsp&nbsp&nbsp</a>
				<#if custType=="NEW" || custType=="Z" ||
					custType=="ZF" || custType=="N" > <a class="action-ajax-btn fr edit btn_blue"
						data-url="<@url value='/loanrest/toAdd_sponsor?loanapplyNo=${loanapply.loanapplyNo}' />">新增加担保人</a>
				</#if>
			</@permission>
			<@permission permissionName="dbrPrint">
				<#if loanapply.wfType == "NF" || loanapply.wfType == "S" ||loanapply.wfType == "O" || loanapply.wfType == "HN">
				   <#if loanapply.bankLoanName=="BC">
				       <#if materEntity!=null>
						   <a class="fr edit btn_blue"   href="<@url value='/downloadMateDbPdf?loanapplyNo=${loanapply.loanapplyNo}'/>">配偶担保打印</a>
						</#if> 
						<a class="fr edit btn_blue"   href="<@url value='/downloadBusinessDbPdf?loanapplyNo=${loanapply.loanapplyNo}'/>">企业担保打印</a>
					</#if> 
			    </#if> 
		   </@permission> 
		</h3>
	    <div id="o2o_SponsorList" class="action-ajax-load-show" data-url="/loanrest/sponsorDetail?loanapplyNo=${loanapply.loanapplyNo}" style="display: none"></div>
	</div>
	<!-- 增加担保人  end -->
	
	<!-- 工作流历史记录 begin
	<div class="action-ajax-load" id="history"
		data-url="<@url value='${agreeUrl}' />"></div> -->
		
		<div class="detailsBox"> <!--审核历史--> 
		<div class="openBox">
		<h3 class="mt20">
		<i class="jtIco1"></i>征信准入审核流程
		</h3>
			<#if loanapply.loanType == "BP"||loanapply.loanType=='BP_JX'||loanapply.loanType=='SG'||loanapply.loanType=='YC'||loanapply.loanType=='SC' >
				<div class="action-ajax-load" data-url="<@url value='/wf/processNode/agreeInfo?referId=${loanapply.loanapplyNo}&amp;processType=CREDIT_BP' domain='o2o.admin.workflow'/>"  style="display: none" >审核历史加载中。。。</div>
				<#elseif (loanapply.loanType == "FQ" || loanapply.loanType == "EA")  >
				<div class="action-ajax-load" data-url="<@url value='/wf/processNode/agreeInfo?referId=${loanapply.loanapplyNo}&amp;processType=CREDIT_FQ' domain='o2o.admin.workflow'/>"  style="display: none" >审核历史加载中。。。</div>
				<#else>
				<div class="action-ajax-load" data-url="<@url value='/wf/processNode/agreeInfo?referId=${loanapply.loanapplyNo}&amp;processType=CREDIT' domain='o2o.admin.workflow'/>"  style="display: none" >审核历史加载中。。。</div>
			</#if>
		</div>
		<div class="detailsBox"> <!--审核历史--> 
		<div class="openBox">
		<h3 class="mt20">
		<i class="jtIco1"></i>财务审核流程
		</h3>
			<div class="action-ajax-load" data-url="<@url value='/wf/processNode/agreeInfo?referId=${loanapply.loanapplyNo}&amp;processType=FINANCE_AUDIT' domain='o2o.admin.workflow'/>"  style="display: none" >审核历史加载中。。。</div>
		</div>
	<!-- 工作流历史记录 end -->
	
	<!-- 动态按钮 -->
	<div  id="detailBtnDiv" class=" tac footFixed">
		<span class="action-ajax-load"
			data-url="<@url value='/detail/loan-detail-button?loanapplyNo=${loanapply.loanapplyNo}&billCode=${loanapply.billCode}&wfType=${loanapply.wfType}&o2oliketype=ZX'/>"></span>
	<#if loanapply.wfType == "O" || loanapply.wfType == "HN">
		<button type="button" class="btn_auto_30 btn_blue">已放款</button>
	</#if>
		
	<#if loanapply.wfType == "NF" || loanapply.wfType == "S">
	<@permission permissionName="paymentPrint">
<!-- 	<a class="btn_auto_30 btn_blue action-ajax-btn" href="<@url value='/paymentPrint?billCode=${loanapply.billCode}'/>" target="_blank">付款确认书打印（附件)</a> -->
	</@permission>
	</#if>
	<!-- 
	<#if loanapply.wfType != "T">
	<#if loanapply.bankType!=null> <a class="btn_auto_30 btn_blue"
		href="<@url value='/accessory/help/interview?resourceCode=businessGuidelines'/>"
		target="_blank">空白合同下载</a> </#if>
	
	<a href="<@url value='/process/auditors?orgNo=${loanapply.ltd}' domain='o2o.admin.workflow'/>" class="btn_auto_30 btn_blue" target="_blank" />查看所有流程节点及审核人</a>
	</#if>	 -->
	</div>
</div>
<script type="text/javascript">
	function open_history() {
		$("#history .action-open-button").trigger("click");
	}
</script>
</@master>

